package com.itheima.ood.inner.demo03;

public class Body {

    private int weight = 30;					   // 身体

    class Heart {								   // 在成员位置定义一个类

        private int weight = 20;

        public void jump() {

            int weight = 10;
            System.out.println("心脏在跳动 " + weight);	// 10
            System.out.println("心脏在跳动 " + this.weight);	// 20
//            System.out.println("心脏在跳动 " + new Body().weight);	// 30
            System.out.println("心脏在跳动 " + Body.this.weight);            // 对this进行一个限定

        }
    }
}